//
//  MK_Content_Model.m
//  miku直播
//
//  Created by 杨尚达 on 2017/7/23.
//  Copyright © 2017年 杨尚达. All rights reserved.
//

#import "MK_Content_Model.h"

@implementation MK_Content_Model

-(NSArray<NSString *> *)slidePicUrlArr{
    if (_slidePicUrlArr == nil) {
        NSMutableArray* res = [NSMutableArray new];
        [_slideModelArr enumerateObjectsUsingBlock:^(MK_HomeSlideItem * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
            [res addObject:obj.picURL];
        }];
        _slidePicUrlArr = res;
    }
    
    return _slidePicUrlArr;
}

-(NSArray<NSString *> *)slideTitleUrlArr{
    if (_slideTitleUrlArr == nil) {
        NSMutableArray* res = [NSMutableArray new];
        [_slideModelArr enumerateObjectsUsingBlock:^(MK_HomeSlideItem * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
            [res addObject:obj.title];
        }];
        [res removeObjectAtIndex:0];
        _slideTitleUrlArr = res;
    }
    
    return _slideTitleUrlArr;
}

-(NSArray<NSString *> *)categoryImageUrlArr{
    if (_categoryImageUrlArr == nil) {
        NSMutableArray* res = [NSMutableArray new];
        [_livingRoomArr enumerateObjectsUsingBlock:^(MK_HotRoomModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
            [res addObject:obj.iconUrl];
        }];
        [res removeObjectAtIndex:0];
        _categoryImageUrlArr = res;
    }
    
    return _categoryImageUrlArr;
}


-(NSArray<NSString *> *)categoryTitleName{
    if (_categoryTitleName == nil) {
        NSMutableArray* res = [NSMutableArray new];
        [_livingRoomArr enumerateObjectsUsingBlock:^(MK_HotRoomModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
            [res addObject:obj.tagName];
        }];
        _categoryTitleName = res;
    }
    
    return _categoryTitleName;
}
@end
